<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>两面翻转的盒子</title>
    <style>
        body {
            perspective: 500px;
        }

        .box {
            transform-style: preserve-3d;
            position: relative;
            width: 200px;
            height: 200px;
            margin: 100px auto;
            transition: all .3s;
        }

        .box:hover {
            transform: rotateY(180deg);
        }

        .front,
        .back {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            text-align: center;
            line-height: 200px;
            border-radius: 50%;
        }

        .front {
            background: pink;
            transform: rotateY(180deg);
        }

        .back {
            background: green;
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="front">天气还可以！</div>
        <div class="back">今天星期天</div>
    </div>
</body>

</html>